package com.agree.util.excel.enums;

import com.agree.util.excel.handlers.mapping.*;

/**
 * Created by wangmu on 2017/12/5.
 */
public enum MappingType {

    SIMPLE_ADD("添加","ADD", AddMappingHandler.class,"通用添加"),
    SIMPLE_DELETE("删除","DELETE", DeleteMappingHandler.class,"按主键删除"),
    SIMPLE_UPDATE("修改","UPDATE", UpdateMappingHandler.class,"按主键修改"),
    SIMPLE_QUERY("查询","QUERY", QueryMappingHandler.class,"按主键查询"),
    SIMPLE_QUERY_EXAMPLE("查询","QUERY", QueryExampleMappingHandler.class,"通过文件读入按条件查询"),
    SIMPLE_QUERY_PAGE("查询","QUERY", QueryPageMappingHandler.class,"按主键分页查询"),
    SIMPLE_QUERY_EXAMPLE_PAGE("查询","QUERY", QueryExamplePageMappingHandler.class,"通过文件读入按条件分页查询");

    private final String value;
    private final String name;

    private final Class<? extends MappingHandler> handlerClass;

    private final String desc;

    MappingType(String value, String name, Class<? extends MappingHandler> handlerClass,String desc) {
        this.value = value;
        this.name = name;
        this.handlerClass = handlerClass;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public Class<? extends MappingHandler> getHandlerClass() {
        return handlerClass;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }
}
